home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nejlepší hry
/
Nejlepsi hry.iso
/
hry
/
sea of chaos
/
sea_install.msi
/
_15C39AAA7726369D39812BD40F01CF6A
/
_7878E23C9F0349D19FB852BE520B9238
< prev
next >
Wrap
Text File
|
2005-07-20
|
666b
|
44 lines
float4x4 matViewProj;
float3 udir;
float3 vdir;
float3 cpos;
float perAngle;
struct VS_INPUT
{
float4 Pos : POSITION;
float4 Color : COLOR;
};
struct VS_OUTPUT
{
float4 Pos : POSITION;
float4 Color : COLOR;
};
//shader code
VS_OUTPUT VShader(VS_INPUT In)
{
VS_OUTPUT Out;
float temp = perAngle*In.Pos[0];
temp = (temp)*(3.14159f/180.f);
float rscale = In.Pos[1];
In.Pos.xyz = 0;
In.Pos += float4(udir,0)*(cos(temp)*rscale);
In.Pos += float4(vdir,0)*(sin(temp)*rscale);
In.Pos += float4(cpos,0);
Out.Color=In.Color;
Out.Pos = mul(matViewProj,In.Pos);
return Out;
}